﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Lhxm.Sgs.Model;
using Lhxm.Sgs.IBll;

namespace Lhxm.Sgs.Bll
{
    public class UserAccountService:BaseService<userAccount>,IUserAccountService
    {
        public override void SetCurrentDal()
        {
            CurrentDal = this.CurrentDBSession.userAccountDal;
        }

        #region IUserAccountService 成员,批量删除多条数据

        public bool DeleteRecs(List<int> list)
        {
            var userAccountList = this.CurrentDBSession.userAccountDal.LoadEntities(u=>list.Contains(u.id));
            foreach (var userAccount in userAccountList)
            {
                this.CurrentDBSession.userAccountDal.DeleteEntiy(userAccount);
            }
            return this.CurrentDBSession.SaveChanges();
        }

        #endregion
    }
}
